<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let card=+prompt('输入银行卡余额')
    let month=+prompt('输入当月食宿消费余额')

    let live=+prompt('输入当月生活消费')

    function cost (a,b,c) {
      d=card-month-live
      return d
    }
    // cost(300,100,200)
    alert('剩余银行卡余额为：'+cost(card, month,live))

  </script>
  
</body>
</html>